/**
 * 
 */
package com.david.cms.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @description 栏目组
 * @author David
 * @version 2013-5-23
 */
@Entity
@Table(name = "t_channel_group")
public class ChannelGroup {
	/**
	 * ID号
	 */
	private int id;
	/**
	 * 所属组
	 */
	private Group group;
	/**
	 * 所属栏目
	 */
	private Channel channel;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "g_id")
	public Group getGroup() {
		return group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}

	@ManyToOne
	@JoinColumn(name = "c_id")
	public Channel getChannel() {
		return channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}
}
